/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class Buzzer {
    static categoryCode = '010020038';

    static categoryName = '蜂鸣器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return Buzzer.categoryCode;
    }

    get categoryName() {
        return Buzzer.categoryName;
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pZgRtGkL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getVolume(params) {
        return command({
            method: 'getVolume',
            methodId: 'pGox7xVS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setBeep(params) {
        return command({
            method: 'setBeep',
            methodId: 'pUPQO3IZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peHyqSCr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setVolume(params) {
        return command({
            method: 'setVolume',
            methodId: 'ppAXiVld',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default Buzzer;
